package com.xxx.user.api;


import com.xxx.common.base.bo.ListResult;
import com.xxx.user.dto.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "xxx-user-service")
public interface UserApi {

    /*** 创建 */
    @PostMapping("v1/user/create")
    String create(@RequestBody UserCreateReqDTO param);

    /*** 更新 */
    @PutMapping("v1/user/update")
    String update(@RequestBody UserUpdateReqDTO param);

    /*** 删除 */
    @DeleteMapping("v1/user/delete")
    String delete(@RequestBody List<Long> ids);

    /*** 获取全部数据 */
    @GetMapping("v1/user/getAll")
    ListResult<UserGetAllResDTO> getAll(@SpringQueryMap UserGetAllReqDTO param);

    /*** 后台登录 */
    @PostMapping("v2/user/login")
    String login(@RequestBody UserDoLoginReqDTO param);


}
